//
// Created by 86137 on 2024/1/25.
//

#ifndef MYWORK_CHASSIS_DATA_CALCULATE_H
#define MYWORK_CHASSIS_DATA_CALCULATE_H


#ifdef __cplusplus
extern "C" {
#endif

#include "LK_motor_driver.h"
#include "DJI_motor_driver.h"
#include "DM_motor_driver.h"
#include "pwm_motor_driver.h"
#include "arm_math.h"
#include "math.h"
#include "drv_dr16.h"
#include "task_bluetooth.h"


const float MOTOR_RATIO = 19;
const float RADIUS = 60;
const float ONE_CYCLE = 376.99;

void chassis_data_calculate(void);
void chassis_round_calculate(void);
void chassis_round_update(void);
float absolute(float x);

typedef struct {
    float x;
    float y;
    float z;
    float yaw;
    uint8_t is_cut_on;
} ctrl_msg_data;
#ifdef __cplusplus
}
#endif

#endif //MYWORK_CHASSIS_DATA_CALCULATE_H
